Treemap tiling topic
Several built-in tiling methods are provided for use with Treemap.tile.
Functions
-
treemapBinary<
T> (HierarchyNode< Treemap Treemap tilingT> node, num x0, num y0, num x1, num y1) → void -
Recursively partitions the specified
nodeinto an approximately-balanced binary tree, choosing horizontal partitioning for wide rectangles and vertical partitioning for tall rectangles. -
treemapDice<
T> (HierarchyNode< Treemap Treemap tilingT> node, num x0, num y0, num x1, num y1) → void -
Divides the rectangular area specified by
x0,y0,x1,y1horizontally according the value of each of the specifiednode’s children. -
treemapResquarify<
T> (HierarchyNode< Treemap Treemap tilingT> parent, num x0, num y0, num x1, num y1) → void - Like treemapSquarify, except preserves the topology (node adjacencies) of the previous layout computed by treemapResquarify, if there is one and it used the same target aspect ratio. The golden ratio, φ = (1 + sqrt(5)) / 2, per Kong et al. is used.
-
treemapResquarifyRatio<
T> (num ratio) → void Function(HierarchyNode< Treemap Treemap tilingT> , num, num, num, num) -
Specifies the desired aspect ratio of the generated rectangles. The
ratiomust be specified as a number greater than or equal to one. -
treemapSlice<
T> (HierarchyNode< Treemap Treemap tilingT> node, num x0, num y0, num x1, num y1) → void -
Divides the rectangular area specified by
x0,y0,x1,y1vertically according the value of each of the specifiednode’s children. -
treemapSliceDice<
T> (HierarchyNode< Treemap Treemap tilingT> node, num x0, num y0, num x1, num y1) → void -
If the specified
nodehas odd depth, delegates to treemapSlice; otherwise delegates to treemapDice. -
treemapSquarify<
T> (HierarchyNode< Treemap Treemap tilingT> parent, num x0, num y0, num x1, num y1) → void - Implements the squarified treemap algorithm by Bruls et al., which seeks to produce rectangles of a given aspect ratio. The golden ratio, φ = (1 + sqrt(5)) / 2, per Kong et al. is used.
-
treemapSquarifyRatio<
T> (num ratio) → void Function(HierarchyNode< Treemap Treemap tilingT> , num, num, num, num) -
Specifies the desired aspect ratio of the generated rectangles. The
ratiomust be specified as a number greater than or equal to one.